//
//  User.m
//  QinRen
//
//  Created by Donny on 15/3/16.
//  Copyright (c) 2015年 Donny. All rights reserved.
//

#import "User.h"

@implementation User


+ (User *)sharedUser
{
    static User *sharedAccountManagerInstance = nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        sharedAccountManagerInstance = [[self alloc] init];
    });
    return sharedAccountManagerInstance;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    NSLog(@"%@类这个字段没有定义%@",[NSString stringWithUTF8String:object_getClassName(self)],key);
}

//- (void)setValue:(id)value forKey:(NSString *)key
//{
//    
//    [super setValue:value forKey:key];
//    
//    
//}

- (void)setUserInfo:(NSDictionary *)userinfo
{
    self.employee_id = [userinfo objectForKey:@"employee_id"];
    self.employee_username = [userinfo objectForKey:@"employee_username"];
    self.employee_truename = [userinfo objectForKey:@"employee_truename"];
    self.dept_id = [userinfo objectForKey:@"dept_id"];
    self.employee_gender = [[userinfo objectForKey:@"employee_gender"] integerValue];
    self.employee_phone = [userinfo objectForKey:@"employee_phone"];
    self.employee_address = [userinfo objectForKey:@"employee_address"];
    self.employee_img = [userinfo objectForKey:@"employee_img"];
    self.customer_count = [[userinfo objectForKey:@"customer_count"] integerValue];
    self.role_name = [userinfo objectForKey:@"role_name"];
    self.employee_type = [[userinfo objectForKey:@"employee_type"] integerValue];
    self.hx_username = [userinfo objectForKey:@"hx_username"];
    self.hx_groupid = [userinfo objectForKey:@"hx_groupid"];
    self.status = [[userinfo objectForKey:@"status"] integerValue];
    self.msg = [userinfo objectForKey:@"msg"];
    self.hx_userpwd = [userinfo objectForKey:@"hx_userpwd"];
}
@end
